package com.itlong.cloud.property.service.impl;

import com.itlong.cloud.POJO.PO.ProjectPO;
import com.itlong.cloud.property.dao.IPropertyPayPasswordDao;
import com.itlong.cloud.property.service.IPropertyPayPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <desc>
 *      支付密码业务处理接口实现类
 * </desc>
 *
 * @createDate 2018/09/25
 */
@Service
public class PropertyPayPasswordServiceImpl implements IPropertyPayPasswordService{

    @Autowired
    IPropertyPayPasswordDao iPropertyPayPasswordDao;


    /**
     * <desc>
     *      修改支付密码
     * </desc>
     *
     * @param projectId 项目id
     * @param password 旧支付密码
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/25
     */
    @Override
    public Integer updatePayPassword(String projectId, String password) {
        return iPropertyPayPasswordDao.updatePayPassword(projectId,password);
    }

    /**
     * <desc>
     *      获取项目支付密码详情
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/25
     */
    @Override
    public ProjectPO getProjectInfo(String projectId) {
        return iPropertyPayPasswordDao.getProjectInfo(projectId);
    }

    /**
     * <desc>
     *      验证银行卡信息
     * </desc>
     *
     * @param userName
     * @param bankCardNo
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/25
     */
    @Override
    public Integer checkBankInfo(String projectId,String userName, String bankCardNo) {
        return iPropertyPayPasswordDao.checkBankInfo(projectId,userName,bankCardNo);
    }

}
